package com.guoxue.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 由工具生成的java类,手工修改无效!
 * 
 * 
 */
@Entity
@Table(name = "giveAwayRecordVo")
public class GiveAwayRecordVo {
	// /////////////////////////////////////////////////////////////////////////////
	// --->字段定义:
	// /////////////////////////////////////////////////////////////////////////////
	/**
	 * 主键id
	 */
	@Id
	@GenericGenerator(name = "generator", strategy = "identity")
	@GeneratedValue(generator = "generator", strategy = GenerationType.IDENTITY)
	private int id;
	
	private int uid;
	
	private int giveUid;
	
	private String giveTime;
	
	private int total;
	
	private int goodsId;
	
	private int popularityValue;
	
	private int tapesId;
	
	
	/**
	 * 记录状态,0表示正常,-0x10表示已删除
	 */
	private int sysflag = 0;
	// /////////////////////////////////////////////////////////////////////////////
	// --->getter and setter:
	// /////////////////////////////////////////////////////////////////////////////
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	public int getUid() {
		return uid;
	}
	public void setUid(int uid) {
		this.uid = uid;
	}
	public int getGiveUid() {
		return giveUid;
	}
	public void setGiveUid(int giveUid) {
		this.giveUid = giveUid;
	}
	public String getGiveTime() {
		return giveTime;
	}
	public void setGiveTime(String giveTime) {
		this.giveTime = giveTime;
	}
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	public int getGoodsId() {
		return goodsId;
	}
	public void setGoodsId(int goodsId) {
		this.goodsId = goodsId;
	}
	public int getPopularityValue() {
		return popularityValue;
	}
	public void setPopularityValue(int popularityValue) {
		this.popularityValue = popularityValue;
	}
	
	public int getTapesId() {
		return tapesId;
	}
	public void setTapesId(int tapesId) {
		this.tapesId = tapesId;
	}
	
	public int getSysflag() {
		return sysflag;
	}
	public void setSysflag(int sysflag) {
		this.sysflag = sysflag;
	}
	
	// /////////////////////////////////////////////////////////////////////////////
	// --->流读写方法和打印方法:
	// /////////////////////////////////////////////////////////////////////////////
	@Override
	public String toString() {
		final StringBuilder sb = new StringBuilder();
		final String info;

		sb.append(",id=" + this.id);
		sb.append(",total=" + this.total);
		sb.append(",giveTime=" + this.giveTime);
		sb.append(",giveUid=" + this.giveUid);
		sb.append(",uid=" + this.uid);
		sb.append(",goodsId=" + this.goodsId);
		sb.append(",tapesId=" + this.tapesId);
		sb.append(",popularityValue=" + this.popularityValue);
		sb.append(",sysflag=" + this.sysflag);

		info = sb.toString();
		return info;
	}

	// /////////////////////////////////////////////////////////////////////////////
	// --->clone and copy:
	// /////////////////////////////////////////////////////////////////////////////
	@Override
	public Object clone() throws CloneNotSupportedException {
		return (GiveAwayRecordVo) super.clone();
	}
	/**
	 * 令当前对象(this)成为指定对象(src)的拷贝
	 * 对简单数据类型的数组,进行深层复制
	 * 对dataMap数据,进行dataMap的整体复制
	 * @param src
	 */
	public void copyOf(GiveAwayRecordVo src){
		this.id = src.id;
		this.total = src.total;
		this.giveUid = src.giveUid;
		this.goodsId = src.goodsId;
		this.sysflag = src.sysflag;
		this.giveTime = src.giveTime;
		this.tapesId = src.tapesId;
		this.popularityValue = src.popularityValue;
		this.uid = src.uid;
	}

}
